<?php

declare (strict_types=1);

namespace app\controller\admin;

use app\model\Menu;

class Js extends Common
{
    public function js()
    {
        $json = array();
        $list = Menu::field('title,url')->where(['status' => 1])->select();
        foreach ($list as $k => $v) {
            $json[] = lang($v['title']);
            $json[] = $v['url'];
        }

        return json($json);
    }
}
